package org.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.model.Article;

import java.util.List;

@Mapper
public interface ArticleMapper {

    @Insert("insert  into article(title, content, cover_img, create_user, create_time, update_time) " +
            "values (#{title}, #{content}, #{coverImg}, #{createUser}, now(), now())")
    public void create(Article article);

    List<Article> list(Integer pageIndex, Integer pageSize, String title, Integer userId);
}
